<template>
  <div
    :class="prefixCls"
    class="relative h-[100%] lt-md:px-10px lt-sm:px-10px lt-xl:px-10px lt-xl:px-10px"
    style="overflow: hidden"
  >
    <div class="acss-trkbkn"></div>
    <div class="relative mx-auto h-full flex">
      <div class="relative flex-1 p-30px dark:bg-[var(--login-bg-color)] lt-sm:p-10px">
        <!-- 右边的登录界面 -->
        <Transition appear enter-active-class="animate__animated animate__bounceInRight">
          <div
            class="m-auto h-full w-[100%] flex items-center at-2xl:max-w-500px at-lg:max-w-500px at-md:max-w-500px at-xl:max-w-500px"
          >
            <!-- 账号登录 -->
            <LoginForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" style="margin-top: 78px; max-width: 360px;"/>
          </div>
        </Transition>
      </div>
    </div>

    <div style="color: var(--el-color-info-dark-2); font-size: 14px;position: fixed;bottom: 24px;display: flex;width: 100%;margin-block: 0;margin-block-start: 48px;margin-block-end: 24px;margin-inline: 0;padding-block: 0;text-align: center;justify-content: center;">
      Copyright © 2024 东风汽车金融有限公司
    </div>
  </div>
</template>
<script lang="ts" setup>
import { useDesign } from '@/hooks/web/useDesign'
import { LoginForm } from './components'

defineOptions({ name: 'Login' })

const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('login')
</script>

<style lang="scss" scoped>
$prefix-cls: #{$namespace}-login;

.#{$prefix-cls} {
  overflow: auto;

  &__left {
    &::before {
      position: absolute;
      top: 0;
      left: 0;
      z-index: -1;
      width: 100%;
      height: 100%;
      background-image: url('@/assets/svgs/login-bg.svg');
      background-position: center;
      background-repeat: no-repeat;
      content: '';
    }
  }
}

.acss-trkbkn {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
  height: 100vh;
  overflow: auto;
  background-image: url('/login-bg.png');
  -webkit-background-size: 100% 100%;
  background-size: 100% 100%;
  position: fixed;
  width: 100%;
}
</style>
